package com.powergisol.gis.vo;



import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;


import java.io.Serializable;
import java.util.List;

@JacksonXmlRootElement(localName ="WMS_Capabilities")
public class GetCapabilities implements Serializable{

    @JacksonXmlProperty(isAttribute = true)
    private String version;

    @JacksonXmlProperty(isAttribute = true)
    private String updateSequence;

    @JacksonXmlProperty(localName = "Capability")
    private Capability capability;

    public void setCapability(Capability capability) {
        this.capability = capability;
    }

    public Capability getCapability() {
        return capability;
    }

    public void setUpdateSequence(String updateSequence) {
        this.updateSequence = updateSequence;
    }

    public String getUpdateSequence() {
        return updateSequence;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getVersion() {
        return version;
    }

    public static class Capability implements Serializable  {

        @JacksonXmlProperty(localName = "Layer")
        private Layer layer;

        public Layer getLayer() {
            return layer;
        }

        public void setLayer(Layer layer) {
            this.layer = layer;
        }
    }

    public static class Layer implements Serializable {

        private List<LayerDetail> layers;

        public void setLayers(List<LayerDetail> layers) {
            this.layers = layers;
        }

        @JacksonXmlElementWrapper(useWrapping = false)
        @JacksonXmlProperty(localName = "Layer")
        public List<LayerDetail> getLayers() {
            return layers;
        }
    }

    public static class LayerDetail implements Serializable{

        @JacksonXmlProperty(isAttribute = true)
        private String queryable;
        @JacksonXmlProperty(isAttribute = true)
        private String opaque;

        @JacksonXmlProperty(localName = "Name")
        private String name;

        @JacksonXmlProperty(localName = "Title")
        private String title;

//        @JacksonXmlElementWrapper(useWrapping = false)
//        @JacksonXmlProperty(localName = "CRS")
//        private String crs;
//        @JacksonXmlElementWrapper(useWrapping = false)
//        @JacksonXmlProperty(localName = "CRS")
//        private List<CRS> crs;

        private List<String> crs;

        @JacksonXmlProperty(localName = "EX_GeographicBoundingBox")
        private EXGeographicBoundingBox exGeographicBoundingBox;

//        @JacksonXmlProperty(localName = "BoundingBox")
//        private BoundingBox boundingBox;

        @JacksonXmlElementWrapper(useWrapping = false)
        @JacksonXmlProperty(localName = "BoundingBox")
        private List<BoundingBox> boundingBox;

        @JacksonXmlProperty(localName = "CRS")
        @JacksonXmlElementWrapper(useWrapping = false)
        public List<String> getCrs() {
            return crs;
        }

        public void setCrs(List<String> crs) {
            this.crs = crs;
        }

        public String getQueryable() {
            return queryable;
        }

        public void setQueryable(String queryable) {
            this.queryable = queryable;
        }

        public String getOpaque() {
            return opaque;
        }

        public void setOpaque(String opaque) {
            this.opaque = opaque;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }


        public EXGeographicBoundingBox getExGeographicBoundingBox() {
            return exGeographicBoundingBox;
        }

        public void setExGeographicBoundingBox(EXGeographicBoundingBox exGeographicBoundingBox) {
            this.exGeographicBoundingBox = exGeographicBoundingBox;
        }

//        public BoundingBox getBoundingBox() {
//            return boundingBox;
//        }
//
//        public void setBoundingBox(BoundingBox boundingBox) {
//            this.boundingBox = boundingBox;
//        }


        public List<BoundingBox> getBoundingBox() {
            return boundingBox;
        }

        public void setBoundingBox(List<BoundingBox> boundingBox) {
            this.boundingBox = boundingBox;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTitle() {
            return title;
        }
    }


    public static class EXGeographicBoundingBox implements Serializable{
        @JacksonXmlProperty(localName = "westBoundLongitude")
        private String westBoundLongitude;
        @JacksonXmlProperty(localName = "eastBoundLongitude")
        private String eastBoundLongitude;
        @JacksonXmlProperty(localName = "southBoundLatitude")
        private String southBoundLatitude;
        @JacksonXmlProperty(localName = "northBoundLatitude")
        private String northBoundLatitude;

        public String getWestBoundLongitude() {
            return westBoundLongitude;
        }

        public void setWestBoundLongitude(String westBoundLongitude) {
            this.westBoundLongitude = westBoundLongitude;
        }

        public String getEastBoundLongitude() {
            return eastBoundLongitude;
        }

        public void setEastBoundLongitude(String eastBoundLongitude) {
            this.eastBoundLongitude = eastBoundLongitude;
        }

        public String getSouthBoundLatitude() {
            return southBoundLatitude;
        }

        public void setSouthBoundLatitude(String southBoundLatitude) {
            this.southBoundLatitude = southBoundLatitude;
        }

        public String getNorthBoundLatitude() {
            return northBoundLatitude;
        }

        public void setNorthBoundLatitude(String northBoundLatitude) {
            this.northBoundLatitude = northBoundLatitude;
        }
    }

    public static class BoundingBox implements Serializable {

        private String CRS;
        @JacksonXmlProperty(isAttribute = true)
        private String minx;
        @JacksonXmlProperty(isAttribute = true)
        private String miny;
        @JacksonXmlProperty(isAttribute = true)
        private String maxx;
        @JacksonXmlProperty(isAttribute = true)
        private String maxy;

        @JacksonXmlProperty(isAttribute = true,localName = "CRS")
        public String getCRS() {
            return CRS;
        }

        public void setCRS(String CRS) {
            this.CRS = CRS;
        }

        public String getMinx() {
            return minx;
        }

        public void setMinx(String minx) {
            this.minx = minx;
        }

        public String getMiny() {
            return miny;
        }

        public void setMiny(String miny) {
            this.miny = miny;
        }

        public String getMaxx() {
            return maxx;
        }

        public void setMaxx(String maxx) {
            this.maxx = maxx;
        }

        public String getMaxy() {
            return maxy;
        }

        public void setMaxy(String maxy) {
            this.maxy = maxy;
        }
    }

}




